package com.weixing.mall.provider.api.service;


import com.weixing.mall.base.wrapper.Result;
import com.weixing.mall.provider.api.fallback.DepotFallBack;
import com.weixing.mall.provider.api.fallback.GoodsTransBillFallBack;
import com.weixing.mall.provider.api.model.vo.SealMatchRuleVo;
import com.weixing.mall.provider.api.model.vo.dto.DepotRPcVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.ribbon.FeignRibbonClientAutoConfiguration;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(value ="mall-provider-depot",configuration = FeignRibbonClientAutoConfiguration.class,fallback = DepotFallBack.class)
public interface DepotServiceRpc {

    @GetMapping("api/depotrpc/getBycode")
    public Result<DepotRPcVo> getBycode(@RequestParam(value = "code",required = false) String code);

    @GetMapping("api/depotrpc/getDepotId")
    public Result<List<DepotRPcVo>> getDepotId(@RequestParam(value = "getDepotId",required = false) Long  getDepotId);

    @GetMapping("api/depotrpc/getById")
    public Result<DepotRPcVo> getById(@RequestParam(value = "id",required = false) Long  id);

    @GetMapping("api/depotrpc/delByCondition")
    public Result delByCondition(@RequestParam(value = "depotId")Long  depotId,
                                 @RequestParam(value = "productId")Long productId,
                                 @RequestParam(value = "depotSn")String depotSn);
}
